package edu.sctu.zhengsenwen.month201506.day20150623.operator;

/**
 * 算术操作符
 * Created by user15 on 2015/6/23.
 */
public class ArithmeticOpetatorDemo {

    public static void main(String[] args) {

        int numberOne = 20;
        int numberTwo = 30;
        double doubleOne = 12.5;
        double doubleTwo = 5.5;
        System.out.println("各个变量的值：");
        System.out.println("numberOne =" + numberOne);
        System.out.println("numberTwo =" + numberTwo);
        System.out.println("doubleOne =" + doubleOne);
        System.out.println("doubleTwo =" + doubleTwo);


        System.out.println("进行相加操作：");
        System.out.println("numberOne + numberTwo =" + (numberOne + numberTwo));
        System.out.println("doubleOne + doubleTwo =" + (doubleOne + doubleTwo));


        System.out.println("进行相减操作：");
        System.out.println("numberOne - numberTwo =" + (numberOne - numberTwo));
        System.out.println("doubleOne - doubleTwo =" + (doubleOne - doubleTwo));

        System.out.println("进行相乘操作：");
        System.out.println("numberOne * numberTwo =" + (numberOne * numberTwo));
        System.out.println("doubleOne * doubleTwo =" + (doubleOne * doubleTwo));

        System.out.println("进行相除操作：");
        System.out.println("numberOne / numberTwo =" + (numberOne / numberTwo));
        System.out.println("doubleOne / doubleTwo =" + (doubleOne / doubleTwo));

        System.out.println("进行取模操作：");
        System.out.println("numberOne % numberTwo =" + (numberOne % numberTwo));
        System.out.println("doubleOne % doubleTwo =" + (doubleOne % doubleTwo));

        System.out.println("不同类型的数字进行运算：");
        System.out.println("numberOne + doubleTwo =" + (numberOne + doubleTwo));
        System.out.println("numberTwo + doubleOne =" + (numberTwo + doubleOne));

    }
}
